import axios from 'axios';

import { API_NEW_VERSION, ALL_SERVICE_API } from '../api';

const STOWAGE_CORE = API_NEW_VERSION + 'stowages/';

// 搜索列表
export const searchStowageCore = params => {
  return axios.get(ALL_SERVICE_API + '/stowages', {params: params});
};

// 保存配载节点
export const saveStowageCore = (params) => {
  return axios.post(ALL_SERVICE_API + '/stowages', params);
};

// 根据ID获取节点信息
export const getStowageCore = id => {
  return axios.get(STOWAGE_CORE + id);
};

// 删除节点信息
export const delStowageCore = id => {
  return axios.delete(ALL_SERVICE_API + '/stowages/' + id);
};
